package vue;

import gestionSites.Site;

import java.awt.Dimension;
import java.awt.GridLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;


/**
 * 
 * fenetre de comparaison de deux sites
 *
 */
public class CompareView extends JFrame {
	
	
	private static final long serialVersionUID = 1L;
	
	/**
	 * vue des graphiques
	 */
	private JPanel graphsView;
	
	/**
	 * constructeur
	 * @param s1 premier site
	 * @param s2 second site
	 */
	public CompareView(Site s1, Site s2){
		
		graphsView = new JPanel(new GridLayout(1, 4));
		this.setTitle("Comparison between "+s1.getName()+" and "+s2.getName());
		
		this.setPreferredSize(new Dimension(1200,800));
		this.dispose();
		pack();
        this.setVisible(true);
        this.add(graphsView);
        
        graphsView.add(s1.drawGraphComparaisonTaille(s2));
        graphsView.add(s1.drawGraphComparaisonNbPages(s2));
        graphsView.add(s1.drawGraphComparaisonNbImages(s2));
        graphsView.add(s1.drawGraphComparaisonNbEmails(s2));
	}
}
